<extend name="Public/base" />
<block name="body">
<div class="m-tab s-tab">
	<h2 class="u-tt">用户管理</h2>
	<div class="filter">
		<form method="get" action="">
			<input name="r" type="hidden" value="admin/User/index" />
			<select class="u-slt" name="group_id" id="group_id">
				<option value="0">==用户角色==</option>
			</select>
			用户名/邮箱：
			<input name="keyword" id="keyword" type="text" value="{$_GET.keyword}" class="u-ipt u-ipt-2"/>
			<button class="u-btn" type="submit">筛选</button>
		</form>
	</div>
	<ul>
		<li class="z-crt"><a href="#">{$meta_title}</a></li>
		<li><a href="{:U('add')}">添加用户</a></li>
	</ul>
</div>
<table class="m-table m-table-row" id="table">
	<thead class="m-table-thead s-table-thead">
		<tr>
			<th class="cola">ID</th>
			<th>帐号</th>
			<th>昵称</th>
			<th>性别</th>
			<th>邮箱</th>
			<th>上次登录时间</th>
			<th>上次登录IP</th>
			<th class="colc">操作</th>
		</tr>
	</thead>
	<tbody>
		<volist name="list" id="vo">
		<tr>
			<td>{$vo.uid}</td>
			<td>{$vo.username}</td>
			<td>{$vo.nickname}</td>
			<td>{$vo.sex_text}</td>
			<td>{$vo.email}</td>
			<td>{$vo.last_login_time|time_format}</td>
			<td>{:long2ip($vo['last_login_ip'])}</td>
			<td>
			<a class="btn btn-mini" href="{:U('auth?uid='.$vo['uid'])}">授权</a>
			<a class="btn btn-mini" href="{:U('changepassword?id='.$vo['uid'])}">修改密码</a>
			<a class="btn btn-mini" href="{:U('edit?id='.$vo['uid'])}">编辑</a>
			<a href="javascript:;" data="{$vo.uid}" class="u-del">删除</a>
			</td>
		</tr>
		</volist>
	</tbody>
</table>
<div class="m-table-tool">
	<div class="m-page"> {$_page} </div>
</div>
</block>

<block name="script">
<script>
Do.ready('base','dialog',function() {
	$('#table').duxTable({
		selectAll:'#selectAll',
		deleteUrl: "{:U('delete')}",
	});
});
</script>	
</block>